﻿Imports MS.Internal.Threading
Imports System.Collections.Concurrent
Imports Runa.Foundation.Messaging

Namespace Global.Runa.Core.Services

    Public Interface ISafeNativeMethods

        Property Timers() As List(Of Tuple(Of DateTime, Win32Timer))
        Property Hwnds() As List(Of IMessageFilter)

        Sub SetTimer(ByVal hwnd As Integer, ByVal nIDEvent As Integer, ByVal interval As Integer, Optional ByVal callback As TickEventHandler = Nothing)
        Sub KillTimer(ByVal hwnd As Integer, ByVal nIDEvent As Integer)
        Sub UpdateTimers(ByVal gameTime As Global.Runa.Foundation.Runtime.GameTimeEventArgs)

        Function GetMessage(ByRef m As Runa.Foundation.Messaging.Message, ByVal tid As Integer) As Boolean
        Function PeekMessage(ByRef m As Runa.Foundation.Messaging.Message, ByVal tid As Integer, ByVal removeMessage As Boolean) As Boolean
        Function GetMessage(ByRef m As Runa.Foundation.Messaging.Message, ByVal tid As Integer, ByVal from As Runa.Foundation.Messaging.MessageType, ByVal [to] As Runa.Foundation.Messaging.MessageType) As Boolean
        Function PeekMessage(ByRef m As Runa.Foundation.Messaging.Message, ByVal tid As Integer, ByVal from As Runa.Foundation.Messaging.MessageType, ByVal [to] As Runa.Foundation.Messaging.MessageType, ByVal removeMessage As Boolean) As Boolean
        Function PostMessage(ByVal m As Runa.Foundation.Messaging.Message) As Boolean
        Function SendMessage(ByVal m As Runa.Foundation.Messaging.Message) As Boolean
        Function PostMessage(ByVal tid As Integer, ByVal m As Runa.Foundation.Messaging.Message) As Boolean
        Function SendMessage(ByVal tid As Integer, ByVal m As Runa.Foundation.Messaging.Message) As Boolean
        Function DispachMessage(ByRef m As Message) As Boolean
        Function TranslateMessage(ByRef m As Message) As Boolean
        Function RegisterWindowClass(ByVal hwnd As IMessageFilter) As Boolean
        Function UnRegisterWindowClass(ByVal hwnd As IMessageFilter) As Boolean
        Function RegisterWindowMessage(ByVal name As String, ByVal value As Integer) As Boolean
        Function GetQueueStatus(ByVal flag As UInt32) As UInt32

    End Interface

End Namespace